import cloneDeep from 'lodash/cloneDeep';

const allRows = [
    {
        id: '11',
        level: '1',
        ljsde: '<= 36,000',
        ykl: 0.03,
        sskcs: 0
    },
    {
        id: '12',
        level: '2',
        ljsde: '36,000~144,000',
        ykl: 0.1,
        sskcs: 2520
    },
    {
        id: '13',
        level: '3',
        ljsde: '144,000~300,00',
        ykl: 0.2,
        sskcs: 16920
    }
];
const dataBefore = cloneDeep(allRows);

const dataAfter = cloneDeep(allRows);
dataAfter[0].status = 1;
dataAfter[1].status = 2;
dataAfter[2].status = 3;
dataAfter[2].isMinPayAmt = 1;


const search = () => {
    console.log(allRows);
    return {
        code: 10000,
        data: {
            employeeDepartment: 'work组',
            employeeName: '张三',
            expireTime: '2020-12-30',
            dataBefore,
            dataAfter
        }
    };
};

export default {
    'GET x/api/finance/salary/v1/setting/social/next/step/*': (req, res) => {
        res.json(search(req));
    }
};
